package importExport;

import java.awt.Graphics2D;
import java.io.File;
import java.io.FileOutputStream;
import java.io.PrintStream;

public class VSSWriter {
	String scriptName="vssSkript";
	PrintStream p;
public VSSWriter(File file){
	try {
		FileOutputStream out = new FileOutputStream(file
				.getAbsolutePath());
		 p = new PrintStream(out);
		 p.println("PROCEDURE "+scriptName+";");
		 p.println("VAR");
		 p.println("hd:HANDLE;");
		 p.println("hd1:HANDLE;");
		 p.println("bl:BOOLEAN;");
		 p.println("Begin");
	} catch (Exception e) {
		System.err.println("error writing file");
	}
	
}
public Graphics2D getVSSGraphic(){
	
	return new VSSGraphics2D(p);
}
public void closeVSS(){
	p.println("end;");
	p.println("run ("+scriptName+");");
	p.close();
}

}
